//用函数嵌套调用实现计算处某年的某月份有几天
int how_days(int y,int m);
#include<stdio.h>
int main()
{
	int year=0;
	int month=0;
	int days=0;
	scanf("%d %d",&year,&month);
	days=how_days(year,month);
	printf("%d年%d月有%d天",year,month,days);
	return 0;
}
//判断某年某月有几天的函数的实现
int how_days(int y,int m)
{
	int arr[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int days=arr[m];//利用数组下标，将下标与月份对应
	int jd_leap=0;
	jd_leap=judge_leap_year(y);
	if(jd_leap==1&&(m==2))
	{
		days++;
	}
	return days;
}
//判断闰年的函数的实现
int judge_leap_year(int y)
{
	int flag=0;
	if((y%4==0&&y%100!=0)||y%400==0)
	{
		flag=1;
	}
	return flag;
	
}
